package com.changan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 登录日志表
 * </p>
 *
 * @author NieChangan
 * @since 2022-08-30
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("tb_login_log")
@ApiModel(value = "LoginLog对象", description = "登录日志表")
public class LoginLog extends Model<LoginLog> {

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("登录时间")
    @TableField("login_time")
    private Date loginTime;

    @ApiModelProperty("登录地点")
    @TableField("location")
    private String location;

    @ApiModelProperty("IP地址")
    @TableField("ip")
    private String ip;

    @ApiModelProperty("操作系统")
    @TableField("user_system")
    private String userSystem;

    @ApiModelProperty("浏览器")
    @TableField("user_browser")
    private String userBrowser;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
